namespace Agro.Models {
        using System;
        using SN.Data;
        
        
        /// <summary>
        /// 表名：T_ZBClasses 主键列：ZBClasses_ID
        /// </summary>
        [SerializableAttribute()]
        public partial class T_ZBClasses : Entity {
            
            protected String _ZBClasses_ID;
            
            protected String _ZBClasses_Name;
            
            protected String _ZBClasses_Parentid;
            
            protected String _ZBClasses_IsDetail;
            
            protected Int32? _ZBClasses_Order;
            
            protected String _ZBClasses_CreateUserID;
            
            protected String _ZBClasses_CreateDate;
            
            protected String _ZBClasses_CreateIP;
            
            protected String _ZBClasses_ZBCode;
            
            public String ZBClasses_ID {
                get {
                    return this._ZBClasses_ID;
                }
                set {
                    this.OnPropertyValueChange(_.ZBClasses_ID, _ZBClasses_ID, value);
                    this._ZBClasses_ID = value;
                }
            }
            
            public String ZBClasses_Name {
                get {
                    return this._ZBClasses_Name;
                }
                set {
                    this.OnPropertyValueChange(_.ZBClasses_Name, _ZBClasses_Name, value);
                    this._ZBClasses_Name = value;
                }
            }
            
            /// <summary>
            /// 为0表示为第一级，即没有上级
            /// </summary>
            public String ZBClasses_Parentid {
                get {
                    return this._ZBClasses_Parentid;
                }
                set {
                    this.OnPropertyValueChange(_.ZBClasses_Parentid, _ZBClasses_Parentid, value);
                    this._ZBClasses_Parentid = value;
                }
            }
            
            /// <summary>
            /// 1非明细，0明细
            /// </summary>
            public String ZBClasses_IsDetail {
                get {
                    return this._ZBClasses_IsDetail;
                }
                set {
                    this.OnPropertyValueChange(_.ZBClasses_IsDetail, _ZBClasses_IsDetail, value);
                    this._ZBClasses_IsDetail = value;
                }
            }
            
            public Int32? ZBClasses_Order {
                get {
                    return this._ZBClasses_Order;
                }
                set {
                    this.OnPropertyValueChange(_.ZBClasses_Order, _ZBClasses_Order, value);
                    this._ZBClasses_Order = value;
                }
            }
            
            public String ZBClasses_CreateUserID {
                get {
                    return this._ZBClasses_CreateUserID;
                }
                set {
                    this.OnPropertyValueChange(_.ZBClasses_CreateUserID, _ZBClasses_CreateUserID, value);
                    this._ZBClasses_CreateUserID = value;
                }
            }
            
            public String ZBClasses_CreateDate {
                get {
                    return this._ZBClasses_CreateDate;
                }
                set {
                    this.OnPropertyValueChange(_.ZBClasses_CreateDate, _ZBClasses_CreateDate, value);
                    this._ZBClasses_CreateDate = value;
                }
            }
            
            public String ZBClasses_CreateIP {
                get {
                    return this._ZBClasses_CreateIP;
                }
                set {
                    this.OnPropertyValueChange(_.ZBClasses_CreateIP, _ZBClasses_CreateIP, value);
                    this._ZBClasses_CreateIP = value;
                }
            }
            
            public String ZBClasses_ZBCode {
                get {
                    return this._ZBClasses_ZBCode;
                }
                set {
                    this.OnPropertyValueChange(_.ZBClasses_ZBCode, _ZBClasses_ZBCode, value);
                    this._ZBClasses_ZBCode = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<T_ZBClasses>("T_ZBClasses");
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.ZBClasses_ID};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.ZBClasses_ID,
                        _.ZBClasses_Name,
                        _.ZBClasses_Parentid,
                        _.ZBClasses_IsDetail,
                        _.ZBClasses_Order,
                        _.ZBClasses_CreateUserID,
                        _.ZBClasses_CreateDate,
                        _.ZBClasses_CreateIP,
                        _.ZBClasses_ZBCode};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._ZBClasses_ID,
                        this._ZBClasses_Name,
                        this._ZBClasses_Parentid,
                        this._ZBClasses_IsDetail,
                        this._ZBClasses_Order,
                        this._ZBClasses_CreateUserID,
                        this._ZBClasses_CreateDate,
                        this._ZBClasses_CreateIP,
                        this._ZBClasses_ZBCode};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.ZBClasses_ID))) {
                    this._ZBClasses_ID = reader.GetString(_.ZBClasses_ID);
                }
                if ((false == reader.IsDBNull(_.ZBClasses_Name))) {
                    this._ZBClasses_Name = reader.GetString(_.ZBClasses_Name);
                }
                if ((false == reader.IsDBNull(_.ZBClasses_Parentid))) {
                    this._ZBClasses_Parentid = reader.GetString(_.ZBClasses_Parentid);
                }
                if ((false == reader.IsDBNull(_.ZBClasses_IsDetail))) {
                    this._ZBClasses_IsDetail = reader.GetString(_.ZBClasses_IsDetail);
                }
                if ((false == reader.IsDBNull(_.ZBClasses_Order))) {
                    this._ZBClasses_Order = reader.GetInt32(_.ZBClasses_Order);
                }
                if ((false == reader.IsDBNull(_.ZBClasses_CreateUserID))) {
                    this._ZBClasses_CreateUserID = reader.GetString(_.ZBClasses_CreateUserID);
                }
                if ((false == reader.IsDBNull(_.ZBClasses_CreateDate))) {
                    this._ZBClasses_CreateDate = reader.GetString(_.ZBClasses_CreateDate);
                }
                if ((false == reader.IsDBNull(_.ZBClasses_CreateIP))) {
                    this._ZBClasses_CreateIP = reader.GetString(_.ZBClasses_CreateIP);
                }
                if ((false == reader.IsDBNull(_.ZBClasses_ZBCode))) {
                    this._ZBClasses_ZBCode = reader.GetString(_.ZBClasses_ZBCode);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(T_ZBClasses).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<T_ZBClasses>();
                
                /// <summary>
                /// 字段名：ZBClasses_ID - 数据类型：String
                /// </summary>
                public static Field ZBClasses_ID = new Field<T_ZBClasses>("ZBClasses_ID");
                
                /// <summary>
                /// 字段名：ZBClasses_Name - 数据类型：String
                /// </summary>
                public static Field ZBClasses_Name = new Field<T_ZBClasses>("ZBClasses_Name");
                
                /// <summary>
                /// 为0表示为第一级，即没有上级 - 字段名：ZBClasses_Parentid - 数据类型：String
                /// </summary>
                public static Field ZBClasses_Parentid = new Field<T_ZBClasses>("ZBClasses_Parentid");
                
                /// <summary>
                /// 1非明细，0明细 - 字段名：ZBClasses_IsDetail - 数据类型：String
                /// </summary>
                public static Field ZBClasses_IsDetail = new Field<T_ZBClasses>("ZBClasses_IsDetail");
                
                /// <summary>
                /// 字段名：ZBClasses_Order - 数据类型：Nullable`1
                /// </summary>
                public static Field ZBClasses_Order = new Field<T_ZBClasses>("ZBClasses_Order");
                
                /// <summary>
                /// 字段名：ZBClasses_CreateUserID - 数据类型：String
                /// </summary>
                public static Field ZBClasses_CreateUserID = new Field<T_ZBClasses>("ZBClasses_CreateUserID");
                
                /// <summary>
                /// 字段名：ZBClasses_CreateDate - 数据类型：String
                /// </summary>
                public static Field ZBClasses_CreateDate = new Field<T_ZBClasses>("ZBClasses_CreateDate");
                
                /// <summary>
                /// 字段名：ZBClasses_CreateIP - 数据类型：String
                /// </summary>
                public static Field ZBClasses_CreateIP = new Field<T_ZBClasses>("ZBClasses_CreateIP");
                
                /// <summary>
                /// 字段名：ZBClasses_ZBCode - 数据类型：String
                /// </summary>
                public static Field ZBClasses_ZBCode = new Field<T_ZBClasses>("ZBClasses_ZBCode");
            }
        }
    }
    